//!
//! Copyright (c) 2024-2999 北京心月狐科技有限公司 All rights reserved.
//!
//! https://www.mxxshop.com
//!
//! Licensed 并不是自由软件，未经许可不能去掉 MxxShop 相关版权
//!
//! 版权所有，侵权必究！
//!


use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct QueryPageRequest {
    /// 模板名称
    pub template_name: Option<String>,
    // 当前页码数
    pub page_num: Option<u64>,
    // 每页条数
    pub page_size: Option<u64>,
}

#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct QueryPagePO {
    // 模板名称
    pub template_name: Option<String>,
    // 当前页码数
    pub page_num: Option<u64>,
    // 每页条数
    pub page_size: Option<u64>,
}

impl From<QueryPageRequest> for QueryPagePO {
    fn from(request: QueryPageRequest) -> Self {
        Self {
            template_name: request.template_name,
            page_num: request.page_num,
            page_size: request.page_size,
        }
    }
}